package com.codegeek.project.slope.domain;

import com.codegeek.common.utils.ReplaceIllegalChar;
import com.codegeek.framework.aspectj.lang.annotation.Excel;
import com.codegeek.framework.web.domain.BaseEntity;

import java.util.Date;

/**
 * 设备维修记录对象 slope_repair_record
 *
 * @author codegeek
 * @date 2020-02-17
 */
public class SlopeRepairRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long repairRecordId;

    /**
     * 维修开始时间
     */
    @Excel(name = "维修开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;


    /**
     * 维修结束时间
     */
    @Excel(name = "维修结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    public void setEndTime2(Date endTime) {
        this.endTime = endTime;
    }

    public void setRepairRecordId(Long repairRecordId) {
        this.repairRecordId = repairRecordId;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public void setSensor(SlopeSensor sensor) {
        this.sensor = sensor;
    }

    public void setSensorTypeId(Integer sensorTypeId) {
        this.sensorTypeId = sensorTypeId;
    }

    public Date getEndTime2() {
        return endTime;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getRepairRecordId() {
        return repairRecordId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public SlopeSensor getSensor() {
        return sensor;
    }

    public String getDescription() {
        return description;
    }

    public String getRespo() {
        return respo;
    }

    public String getRespoPhone() {
        return respoPhone;
    }

    public Integer getSensorTypeId() {
        return sensorTypeId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public String getDeviceNumber() {
        return deviceNumber;
    }

    /**
     * 问题传感器
     */
    @Excel(name = "问题传感器")
    private SlopeSensor sensor;

    /**
     * 维修说明
     */
    @Excel(name = "维修说明")
    private String description;

    /**
     * 维修人员
     */
    @Excel(name = "维修人员")
    private String respo;

    /**
     * 维修人员电话
     */
    @Excel(name = "维修人员电话")
    private String respoPhone;

    private Integer sensorTypeId;

    private String deviceName;

    private String deviceNumber;

    public void setDescription(String description) {
        this.description = new ReplaceIllegalChar().replace(description);
    }

    public void setRespo(String respo) {
        this.respo = new ReplaceIllegalChar().replace(respo);
    }

    @Override
    public String toString() {
        return "SlopeRepairRecord{" +
                "repairRecordId=" + repairRecordId +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", sensor=" + sensor +
                ", description='" + description + '\'' +
                ", respo='" + respo + '\'' +
                ", respoPhone='" + respoPhone + '\'' +
                ", sensorTypeId=" + sensorTypeId +
                ", deviceName='" + deviceName + '\'' +
                ", deviceNumber='" + deviceNumber + '\'' +
                '}';
    }

    public void setRespoPhone(String respoPhone) {
        this.respoPhone = new ReplaceIllegalChar().replace(respoPhone);
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = new ReplaceIllegalChar().replace(deviceName);
    }

    public void setDeviceNumber(String deviceNumber) {
        this.deviceNumber = new ReplaceIllegalChar().replace(deviceNumber);
    }
}
